package com.example.usagelock;

import android.content.*;

public class PasswordOrganizer {
	
	SharedPreferences pref;
	SharedPreferences.Editor editor;
	
	public PasswordOrganizer(Context context) {
		super();
		
		pref = context.getSharedPreferences("password", 0);
		editor = pref.edit();
	}
	
	public void setPasswrod(int order, int typeOfImage){
		editor.putInt(""+order, typeOfImage);
		editor.commit();
	}
	
	public int getPassword(int order){
		int ret = pref.getInt(""+order, 0);
		return ret;
	}
	
	public int getLength(){
		return pref.getInt("Length", 0);
	}
	
	public void setLength(int length){
		editor.putInt("Length", length);
		editor.commit();		
	}
}
